Repository navigation
feat(console-ai): the AI assistant is one right-side drawer, opened from the top-bar robot and maximized in place - #34665
Conversation
…rom the top-bar robot and maximized in place The console's chat drawer becomes the assistant's only container (ui ADR-0057, amended by its Amendment A3): - The top-bar robot toggles the drawer on the current page without navigating, and carries the plan-awaiting-approval marker. The floating bottom-right button is removed. - The drawer's expand button makes the same element fill the window in place, with the conversation history as a column; the same button restores the rail, and leaving the page restores it too. At rail width the history is behind a History button; the phone sheet has one as well. - What the drawer shows is a per-tab target (agent, conversation, package, fresh), held by the layout host (useConsoleChatDock) that ConsoleLayout and HomeLayout both mount. Pages open the drawer through useOpenAssistant; outside a host it falls back to the old address. - The /ai, /ai/:agent and /ai/:agent/:conversationId routes render AiAddressRedirect, which arms the drawer on the address (open, filling the window) and lands on the declared home; a Builder handoff rides navigation state only. - Home's "Build with AI" / "Ask AI" and app management's "Edit with AI" open the drawer. A new build still starts unbound. - Inside an app, a builder's empty state names data questions as well as changes, and its first suggestions are data questions. - The drawer's share button opens the share dialog (it was a no-op there). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzidTEhaEGRzboS7xTa
…ate zh-Hant from zh-Hans chatDockTarget's storage pins read window, so they live in a .tsx file like chatDockReturnLocation's. zh-Hant.ts is the generator's output (gen:zh-hant), so the new description is written by it, not by hand. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzidTEhaEGRzboS7xTa
…in the edited layout tests
check:test-source-alias judges edited test files: ConsoleLayout reaches
import('@objectstack/lint') through the draft bar's publish preflight, so
each edited test that mounts it loads the module at module top.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzidTEhaEGRzboS7xTa
|
repo:objectstack#3 · os-support-ai · session_01WGufzf35CD4CvA4nKbwwUn L1: REWORK L1 read of #34665 for #34608 (2026-11-17T06:13Z). Merge-base 97defd6, 3 commits, 58 files, +2037/−1192. Both must-fix items below can be answered with comments, without a new push. I will re-read on this same head once they are posted. Must-fixM1. The claim's file surface does not cover 13 changed files. The code-PR surface in claim 6937569040 is
The os-dev-report lists them as deviations, but the seat still has to post a claim amendment naming M2. Acceptance items 1 to 4 have no live readings. The new tests are real and they pass. But in jsdom they only check class names and testids. They can't show that
Should-fixS1. Say what happens to the drawer's thread when you move to another app, and include it in the readings. The target is per tab, and "a target never infers the app" (A3). So once a history row or "Edit with AI" has pointed the drawer at app X's build thread, moving into app Y keeps X's thread, with Notes
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzidTEhaEGRzboS7xTa Live readings on 910dbeb (answers L1 6940375394, M2 and S1)Head-sha: Rig. The real console ( All five acceptance readings match the card. 1. Robot toggles the drawer on the opportunity list, address unchanged.
2. Expand and Restore; History.
3. Empty state in an authorable app as a builder (CRM, package
4. An old link, cold, in a fresh tab.
5. Phone (iPhone 13, 390×844).
S1. Moving from app X to app Y. This is now an acceptance note in the PR body.
So a target follows the tab and never re-binds to the app in view; only the ambient thread does. That is A3's "a target never infers the app". The PR body's acceptance notes now say so, and say which of A2's behaviours remains (the ambient thread only). M1 (claim surface) is the seat's amendment; nothing pushed. The head is unchanged: |
|
repo:objectstack#3 · os-support-ai · session_01WGufzf35CD4CvA4nKbwwUn L1: ACCEPT Re-read on the same head (2026-11-17T06:39Z) after REWORK 6940375394. The code is unchanged, so this read covers only the two must-fix items and S1. M1, met. Claim amendment 6940390955 on #34608 corrects the path of AiChatPage, HomeLayout and HomePage ( M2, met. Live readings are in comment 6940782559, taken on 910dbeb. They come from the real console over a fresh CRM boot with real auth and metadata. Only
This answers my concern about the fixed layer inside the real S1, met. The PR body's acceptance notes now say that a target follows the tab and never re-binds. A row (no package) keeps its "New app" chip across apps. A package-naming target keeps "Editing “CRM”" in Setup. Only the ambient thread follows the app in view. Each case was read live (s1a to s1d). This is A3's "a target never infers the app". The maintainer can see it in the body. Check-runs on 910dbeb. The 58 runs read in my first pass are green. The body edit re-triggered Check Changeset, which was Must-fix: none. Should-fix: none open. Notes (carried, for the seat):
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG 席位记录 · 2026-11-17T06:40ZHead-sha: 维护者速读(终稿)
席位意见:建议批准。已知后续:本 PR 与 #34628(手机底部菜单栏,已在合并队列)在 席位核对
|
…-lziftn # Conflicts: # ui/packages/app-shell/src/layout/ConsoleLayout.tsx
|
repo:objectstack#3 · os-support-ai · session_01WGufzf35CD4CvA4nKbwwUn L1: ACCEPT Delta read 910dbeb..25e013b (2026-11-17T07:08Z). Prior verdict: ACCEPT at 910dbeb (comment 6940813452). What moved. One merge commit, parents 910dbeb (the accepted head) and 77d7f52 (on main, after #34628 and #34656 landed).
Check-runs on 25e013b at read time. PR-body guards, Governed Surface Queue Guard, Check PR Size and filter were green. The Lint, Type Check, Test UI, Live E2E UI and Check Changeset jobs had only just started. The card thread's local readings after the merge: app-shell Must-fix: none. Should-fix: none. Notes: the cleanup follow-ups from my first read still stand, for the filer. |
Requested by Yibo Wang · project thread
Fixes #34608
Clause-②: yes (widening — new @object-ui/i18n locale keys only)
Metadata-protocol: none
ADR: the ui ADR-0057 amendment this implements is #34640 (Amendment A3, docs only, Tier H).
维护者速读
/ai、/ai/build/<id>链接(包括分享链接)打开抽屉并铺满,显示链接指向的会话。应用内搭建者的空状态同时给出「问数据」和「改应用」的引导。/ai路由保留,书签和分享链接继续可用。抽屉显示哪个会话存在本标签页的 sessionStorage,不进 URL。回滚即 revert 本 PR。改动行数 3214,超过 3000 行的人工合并阈值,主要是重写抽屉主体和删除浮动按钮的旧测试。ui/packages/app-shell/src/layout/useConsoleChatDock.tsx(抽屉托管:开关、放大、目标、交接、快捷键);②layout/ChatDock.tsx的ChatDockPanel(同一个 aside 切换fixed inset-0,历史按钮)和layout/ChatDockConversation.tsx(按目标解析会话、历史列);③console/ai/AiAddressRedirect.tsx和ui/apps/console/src/App.tsx的/ai路由。pnpm --dir ui exec vitest run packages/app-shell/src/layout/__tests__/ConsoleLayout.robotTogglesDrawer-34608.test.tsx packages/app-shell/src/layout/__tests__/ChatDock.test.tsx packages/app-shell/src/console/ai/__tests__/AiAddressRedirect-34608.test.tsx packages/app-shell/src/console/ai/__tests__/AiChatPage.appContextComposer-11658.test.tsx,预期全部通过(对应验收 1 到 4)。Before and after
origin/main97defd6)<Link to="/ai">: leaves the page for the full-page chataria-pressedfollows it; the URL does not change/aior/ai/build?package=PKG<aside>becomesfixed inset-0 z-40in place (no remount); the same button restores/aipage/ai,/ai/:agent,/ai/:agent/:id/ai/build…//ai/askonShareunwired)What changes
The drawer host. New
layout/useConsoleChatDock.tsx, mounted by bothConsoleLayoutandHomeLayout. It owns:useChatDockStatewith the per-tab expanded flag and a new per-tab full-window flag.ChatDockTarget(agent,conversationId,packageId,fresh) kept in sessionStorage. Absent means the ambient thread, so the existing app binding (A2) is unchanged.It returns the rail (for
AppShell'srightRail), the phone sheet, and aChatDockControlhandle provided throughChatDockControlProvider.Opening the drawer. New
layout/chatDockControl.tsx:useChatDockControl()anduseOpenAssistant().useOpenAssistantopens the drawer in place inside a host. Outside one (a page no host wraps) it navigates to the old address, which the console routes back into the drawer.ChatPane's agent launcher, package switcher, "New app" and "Open in Builder" go through it. Inside the drawer a nested provider maps those calls onto the drawer's target.The target grammar. New React-free
layout/chatDockTarget.ts:parseAiAddress,aiAddressOf, the target and full-window storage helpers (no-ops inside a frame, objectstack#26470),sameDockTarget, andreadBuilderHandoffState(moved fromAiChatPage).The panel.
layout/ChatDock.tsx:useChatDockStategainsfullWindowandsetFullWindow. Setting it expands the drawer;toggleandcollapseclear it. It persists withpersistFullWindow.ChatDockPanel: withfullWindowthe same<aside>switches tofixed inset-0 z-40with no width or resize handle. The expand button (chat-dock-maximize, "Expand" / "Restore side panel") callssetFullWindow. A History toggle shows at rail width.ChatDockMobileSheet: the deferred maximize bridge is removed; it gets a History toggle.onMaximizeandonBoundPackageChangeare removed. The Live Canvasmaximize()/restore()latch is unchanged.The body.
layout/ChatDockConversation.tsxresolves its agent and conversation from the target:resolveAgentParam. A legacy bare conversation id is resolved to its agent throughfetchConversation.askis converged tobuild(cloud#1674).forceNewfor a fresh target. The minted id is written back to the target once the first send creates it.ConversationsSidebaras a column. Rail and sheet draw it as an overlay over the still-mounted pane.History.
console/ai/ConversationsSidebar.tsxgets a hosted mode (onSelectConversation,onNewConversation,activeConversationId): rows, "New" and deleting the open thread call back instead of navigating.Entries.
layout/AssistantTopBarButton.tsxreplaces AppHeader's robot link. With a host it is a toggle; without one it is still a link to/ai.HomePageandAppManagementPageuseuseOpenAssistant.ConsoleChatbotFab.tsxand its two test files are deleted.Addresses. New
console/ai/AiAddressRedirect.tsxwrites the parsed target, the expanded flag and the full-window flag, then replaces the visit withuseHomePath(), passing a handoff on as navigation state.ui/apps/console/src/App.tsxroutes the three/aipaths to it insideRequireAiSurface. The lazyDefaultAiChatPageandcomponents/aiChatPage.tsare removed.AiChatPagestays exported; the console no longer routes to it.Guidance.
agentEmptyState's edit-mode description readsconsole.ai.empty.editApp.askOrChangeDescription. The new exportededitAppDataSuggestions(t)puts two data questions ahead of the change starters when editing.i18n. New keys in all 11 packs:
console.ai.dock.history,.backToChat,.expand,.restore,console.ai.empty.editApp.askOrChangeDescription. No key removed or changed.Tests
New:
layout/__tests__/ConsoleLayout.robotTogglesDrawer-34608.test.tsx(replacesConsoleLayout.fabYieldsToOpenDock-10899): realConsoleLayout, host, dock state and robot. The robot opens the drawer on/apps/crm/opportunitywith the URL unchanged, closes it again, and no floating button exists. Acceptance 1.layout/__tests__/ChatDock.test.tsx: expand asks for full window, the full panel isfixed inset-0with no resize handle and a "Restore side panel" button that restores. The same<aside>and the same body element survive the switch (no remount). The rail's History toggle and the full window's column (no toggle). The sheet has no expand button and has a History toggle.useChatDockStatefull-window semantics and persistence. Acceptance 2.console/ai/__tests__/AiChatPage.appContextComposer-11658.test.tsx: inside an app the build pane's first two suggestions are data questions, then the change starters, and the empty description names data. A control with no app. Acceptance 3.console/ai/__tests__/AiAddressRedirect-34608.test.tsx:/ai/build/c-42lands home with the target, expanded and full window armed.?package=&new=1is kept. Bare/aiclears an old target. The declared home is honoured. A handoff rides navigation state and never storage. Acceptance 4.layout/__tests__/ChatDock.appBinding-10926.test.tsx: a build target naming app X opened with no app in view resumes the thread the in-app dock bound to X. A target naming a conversation shows that conversation. Acceptance 4.layout/__tests__/chatDockTarget.test.tsx: address parsing (mount prefix,?agent=, escapes),aiAddressOfround trip, storage round trip, malformed storage, frame isolation.console/ai/__tests__/ConversationsSidebar.test.tsx: the hosted mode.console/ai/__tests__/editModeEmptyState.test.ts: the description andeditAppDataSuggestions.Re-pointed:
launcherPlanApprovalMarker-11666,AiChatPage.planApprovalReachesLaunchers-11666) now target the robot.ConsoleLayout.previewFrameDock-26470presses the robot.ConsoleLayout.dockBinding-10926's two maximize-routing cases became "the target is held per tab and survives a remount" and "back to ambient clears it".fullWindow.App.*tests stubAiAddressRedirectwhere they stubbedDefaultAiChatPage.Deleted:
ConsoleChatbotFab.test.tsx,ConsoleChatbotFab.yieldsCorner-12248.test.tsx(the component is gone),ConsoleLayout.aiEntryAsksUnsaved-13253.test.tsx(maximize no longer leaves the page, so there is nothing to confirm).Acceptance notes
/_console/ai/build/<id>link shows that conversation". The redirect is pinned on the route table's paths (the router basename strips/_console), and the drawer resolving the conversation is pinned on the real body./ai…addresses are that door, as Amendment A3 records.useHomePath()answers/homeuntil the app list loads, so the drawer opens over the launcher rather than the declared app. Both host the same drawer.data-fab-yieldattributes inplugin-detail(InlineEditSaveBar) andRecordAttachmentsPanelno longer have a reader. Left in place. A follow-up can remove them.console.ai.dock.maximizeandconsole.ai.empty.editApp.descriptionare no longer read. They are kept, because the scope is new keys only. The dead-key report lists the first as needs-review./ai/build?package=…. It now lands on Home with the drawer maximized on that package's thread. AI 搭建:在右侧抽屉里搭建,主区域直接显示应用草稿本身;去掉嵌套预览,整屏一个发布按钮、一个改动数 #34610 replaces it with an in-place widen (A3, "One container").AiChatPagepage component stays exported (17 test files render it). Unrouting it is a follow-up.ChatbotEnhanced.tsxorPendingDraftsBar.tsx(AI 助手面板:内容区没有内边距,表格超出面板右边被裁 #34609, fix(console): the publish-health line shows a finding's customer sentence and folds agent text under technical details #34539).Verification
Head 910dbeb. Run in a 4-vCPU cloud container.
Tests:
pnpm --dir ui exec vitest run packages/app-shell/src/console/ai packages/app-shell/src/console/home packages/app-shell/src/layout packages/app-shell/src/chrome packages/app-shell/src/views/studio-design/__tests__/studioCopilotOpenFullPage-12842.test.tsx packages/app-shell/src/__tests__/print-stylesheet-4462.test.ts: 265 of 266 files passed and 1746 tests passed.chatDockTarget.test.tsfailed to collect under the node project (window is not defined). It is renamed to.tsxin 9c18bb8 and passes (withChatDock.test.tsxandChatDock.appBinding-10926: 3 files, 34 tests).pnpm --dir ui exec vitest run packages/app-shell/src/layout/__tests__/ChatDock packages/app-shell/src/layout/__tests__/ConsoleLayout packages/i18n apps/console/src/__tests__/App …: 134 of 135 files passed.zh-hant-generatedfailed becausezh-Hant.tsis generated output. It was regenerated withpnpm --filter @object-ui/i18n gen:zh-hantin 9c18bb8 and passes (10 tests).KeyboardShortcutsDialog.wiredOnly-11674and everyConsoleLayout.*test: 10 files, 45 tests, all passed.Type-check and lint:
tsc --noEmitandtsc -p tsconfig.test.jsoninui/packages/app-shell: exit 0.tsc --noEmitinui/apps/consoleafterpnpm --filter @object-ui/app-shell build: exit 0.npx eslinton every changed ui file: 0 errors. The warnings are pre-existing kinds; the one newreact-hooks/refswarning was removed.node ui/scripts/check-i18n-call-site-keys.mjs: exit 0.node ui/scripts/check-i18n-en-drift.mjs: exit 0.node ui/scripts/check-i18n-dead-keys.mjs: exit 0 (a report; it listsconsole.ai.dock.maximizeas needs-review).Derived gates (
node scripts/pm/dispatch-gates.mjs --commands, 41 commands, run at d82cadc while 9c18bb8's rename and regeneration landed; neither touches what a gate reads except test-source-alias, re-run at 910dbeb):node scripts/check-adr-0087-registration.mjs --base origin/main: exit 0node scripts/check-adr-0087-registration.mjs --self-test: exit 0node scripts/check-changeset-no-major.mjs --base origin/main: exit 0node scripts/check-closing-keyword-parity.mjs: exit 0node scripts/check-closing-keyword-parity.mjs --self-test: exit 0node scripts/check-comment-mask-corpus.mjs: exit 0node scripts/check-empty-changeset.mjs --base origin/main: exit 0node scripts/check-empty-changeset.mjs --self-test: exit 0node scripts/check-sdui-manifest.mjs: exit 0node scripts/check-sdui-manifest.mjs --self-test: exit 0node scripts/ci/snapshot-next.mjs --self-test: exit 0node scripts/pm/check-governed-queue-guard.mjs --self-test: exit 0node scripts/pm/release-rehearsal-clone.mjs --self-test: exit 0node scripts/release-pending-publish.mjs --self-test: exit 0pnpm --dir ui exec vitest run scripts/: exit 0pnpm --filter @objectstack/spec run check:duration-unit-keys: exit 0pnpm check:adr-anchors: exit 0pnpm check:changeset-gate-self-tests: exit 0pnpm check:closed-ceremony-text: exit 0pnpm check:cross-package-test-inputs: exit 0pnpm check:dispatcher-error-vocabulary: exit 0pnpm check:driver-memory-census: exit 0pnpm check:engine-double-contract: exit 0pnpm check:error-status-conformance: exit 0pnpm check:gitlink-declared: exit 0pnpm check:merge-driver: exit 0pnpm check:nul-bytes: exit 0pnpm check:published-files: exit 0pnpm check:query-options-erasure: exit 0pnpm check:refd-timer-probe: exit 0pnpm check:registry-log-declared: exit 0pnpm check:rest-log-spy-declared: exit 0pnpm check:role-word: exit 0pnpm check:skill-identifier-liveness: exit 0pnpm check:test-source-alias: exit 1 on the first run (five edited layout tests reachimport('@objectstack/lint')throughConsoleLayout's draft bar). Fixed in 910dbeb with a module-top import; re-run exit 0.pnpm check:tier-file-adoption: exit 0pnpm check:type-check-coverage: exit 0pnpm check:type-check-debt: exit 0pnpm check:undeclared-dep-imports: exit 0pnpm check:watch-hint-literal: exit 0pnpm check:where-matcher: exit 0The gate report puts the change at 3214 changed lines, over the 3000-line human-merge threshold.